/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package com.src.uniandes.ecos.tsp.creditscore.entity;

import java.io.Serializable;
import java.util.Date;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.OneToOne;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

/**
 *
 * @author AndhyMao
 */
@Entity
@Table(name = "tbl_indagacion")
@NamedQueries({@NamedQuery(name = "Indagacion.findAll", query = "SELECT i FROM Indagacion i"), @NamedQuery(name = "Indagacion.findByIndCodigo", query = "SELECT i FROM Indagacion i WHERE i.indCodigo = :indCodigo"), @NamedQuery(name = "Indagacion.findByCliCodigo", query = "SELECT i FROM Indagacion i WHERE i.cliCodigo = :cliCodigo"), @NamedQuery(name = "Indagacion.findByIndFeccon", query = "SELECT i FROM Indagacion i WHERE i.indFeccon = :indFeccon"), @NamedQuery(name = "Indagacion.findByIndConcep", query = "SELECT i FROM Indagacion i WHERE i.indConcep = :indConcep"), @NamedQuery(name = "Indagacion.findByIndNomind", query = "SELECT i FROM Indagacion i WHERE i.indNomind = :indNomind")})
public class Indagacion implements Serializable {
    private static final long serialVersionUID = 1L;
    @Id
    @Basic(optional = false)
    @Column(name = "ind_codigo")
    private Integer indCodigo;
    @Basic(optional = false)
    @Column(name = "cli_codigo")
    private int cliCodigo;
    @Basic(optional = false)
    @Column(name = "ind_feccon")
    @Temporal(TemporalType.TIMESTAMP)
    private Date indFeccon;
    @Basic(optional = false)
    @Column(name = "ind_concep")
    private String indConcep;
    @Basic(optional = false)
    @Column(name = "ind_nomind")
    private String indNomind;
    @JoinColumn(name = "ind_codigo", referencedColumnName = "cli_codigo", insertable = false, updatable = false)
    @OneToOne(optional = false)
    private Cliente cliente;

    public Indagacion() {
    }

    public Indagacion(Integer indCodigo) {
        this.indCodigo = indCodigo;
    }

    public Indagacion(Integer indCodigo, int cliCodigo, Date indFeccon, String indConcep, String indNomind) {
        this.indCodigo = indCodigo;
        this.cliCodigo = cliCodigo;
        this.indFeccon = indFeccon;
        this.indConcep = indConcep;
        this.indNomind = indNomind;
    }

    public Integer getIndCodigo() {
        return indCodigo;
    }

    public void setIndCodigo(Integer indCodigo) {
        this.indCodigo = indCodigo;
    }

    public int getCliCodigo() {
        return cliCodigo;
    }

    public void setCliCodigo(int cliCodigo) {
        this.cliCodigo = cliCodigo;
    }

    public Date getIndFeccon() {
        return indFeccon;
    }

    public void setIndFeccon(Date indFeccon) {
        this.indFeccon = indFeccon;
    }

    public String getIndConcep() {
        return indConcep;
    }

    public void setIndConcep(String indConcep) {
        this.indConcep = indConcep;
    }

    public String getIndNomind() {
        return indNomind;
    }

    public void setIndNomind(String indNomind) {
        this.indNomind = indNomind;
    }

    public Cliente getCliente() {
        return cliente;
    }

    public void setCliente(Cliente cliente) {
        this.cliente = cliente;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (indCodigo != null ? indCodigo.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof Indagacion)) {
            return false;
        }
        Indagacion other = (Indagacion) object;
        if ((this.indCodigo == null && other.indCodigo != null) || (this.indCodigo != null && !this.indCodigo.equals(other.indCodigo))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "com.src.uniandes.ecos.tsp.creditscore.entity.Indagacion[indCodigo=" + indCodigo + "]";
    }

}
